﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using candi;

public partial class TestFeed : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {



    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (txtEbayID.Text.Length > 0)
        {
            Common c = new Common();
            FeedbackDBModel model = new FeedbackDBModel();
            List<FeedBackModel> flist = c.PagingBuyerRecord(txtEbayID.Text);
            model.Store = txtEbayID.Text;// "kplusc_gift";
            foreach (FeedBackModel fbm in flist)
            {
                //Response.Write(fbm.BuyerID + fbm.ItemName + fbm.ItemNo + fbm.Price + "<br>");
                model.BuyerID = fbm.BuyerID;
                model.ItemName = fbm.ItemName;
                model.ItemNo = fbm.ItemNo;
                model.Price = fbm.Price;
                if (fbm.SaleDate != null && fbm.SaleDate.Length > 0)
                {
                    model.SaleDate = DateTime.Parse(fbm.SaleDate);
                }
                model.Add();
            }
        }
    }
}